package org.itboys.kitchen.entity.mysql.income;

import org.itboys.mongodb.entity.BaseMySqlEntity;
import java.math.BigDecimal;


/**
 * Email: empty90911@126.com
 * 时间：2016年3月16日 下午2:32:57 
 * 描述:收益(钱包主表)收支记录
 *
 */
public class KitchenIncomeRecord extends BaseMySqlEntity{
	//公共信息
	private Long memberId; //用户ID
	private Long incomeId;//收益主表ID
	private BigDecimal amount;//交易金额
	private BigDecimal currentAmount;//当前可用金额
	private Integer type;//类型。1，充值，2，充值赠送，3，消费抵扣，4系统返还
	private Integer status;//0未生效，1已生效
	private String remark;//备注

	public KitchenIncomeRecord() {
	}

	public KitchenIncomeRecord(Long memberId, Long incomeId, BigDecimal amount, BigDecimal currentAmount, Integer type, Integer status, String remark) {
		this.memberId = memberId;
		this.incomeId = incomeId;
		this.amount = amount;
		this.currentAmount = currentAmount;
		this.type = type;
		this.status = status;
		this.remark = remark;
	}

	public Long getMemberId() {
		return memberId;
	}

	public void setMemberId(Long memberId) {
		this.memberId = memberId;
	}

	public Long getIncomeId() {
		return incomeId;
	}

	public void setIncomeId(Long incomeId) {
		this.incomeId = incomeId;
	}

	public BigDecimal getAmount() {
		return amount;
	}

	public void setAmount(BigDecimal amount) {
		this.amount = amount;
	}

	public BigDecimal getCurrentAmount() {
		return currentAmount;
	}

	public void setCurrentAmount(BigDecimal currentAmount) {
		this.currentAmount = currentAmount;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	/**
	 * 状态的中文信息
	 */
	public String  getTypeStr(){
		String typeStr= "";
		if(type==null)return typeStr;

		switch (type) {
			case 1:
				typeStr="在线充值";
				break;
			case 2:
				typeStr="充值赠送";
				break;
			case 3:
				typeStr="订单消费";
				break;
			case 4:
				typeStr="系统返还";
				break;
			default:
				break;
		}
		return typeStr;
	}

}
